<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>首页-词多多代理商平台</title>
<include file="Index:header" />
<script type="text/javascript">
        $(function(){
            $(".help-side dl dd:eq(0)").addClass('cur');
            $(".nav ul li:eq(0)").addClass('cur');
        })
        
        $(function(){
            $("#top #topcon .nav li:eq(0)").addClass('cur');
            $("#top #topcon .nav li:eq(0)").addClass('cur');
        })        
</script>
<script src="__PUBLIC__/js/main.js" type="text/javascript"></script>
</head>
<body>
<include file="Index:top"/>
<div id="main">
<div id="main_left" class="container">
<div class="help-side"><include file="Index:left" />
<div class="side-slider"></div>
</div>
</div>
<div id="main_right" class="container">
<div class="title">系统首页</div>
<div id="home_user">
<div id="userface"><img src="__PUBLIC__/images/agentface.gif"
	alt="" /></div>
<div id="userinfo">
<table>
	<tr>
		<td>代理账号：</td>
		<td class="b">{$agent['username']}</td>
	</tr>
	<tr>
		<td>公司名称：</td>
		<td class="b">{$agent['company']}</td>
	</tr>
	<tr>
		<td>代理级别：</td>
		<td class="b">核心代理</td>
	</tr>
	<tr>
		<td>登录信息：</td>
		<td class="b">{$agent['loginip']}</td>
	</tr>
</table>
</div>
</div>
<div class="title c mt10">账户概况</div>
<div id="home_info" class="mt10">
<table border=1 bordercolor=#e7e7e7 cellpadding=3 cellspacing=0
	width=100% align="center">
	<tr align="center">
		<td colspan='4' align='center' bgcolor="#F6F7F6">账户概况统计</td>
	</tr>
	<tr align="center">
		<td>账户余额</td>
		<td><a href="javascript:void(0)">{$agent['money']}</a> 元</td>
		<td>预计使用天数</td>
		<td><a href="javascript:void(0)">{$userinfo['usedays']}</a> 天</td>
	</tr>
	<tr align="center">
		<td colspan='4' align='center' bgcolor="#F6F7F6">客户概况统计</td>
	</tr>
	<tr align="center">
		<td>即将到期客户</td>
		<td><a href="javascript:void(0)">{$userinfo['not_sufficient']}</a>
		个</td>
		<td>昨日计费总计</td>
		<td><a href="javascript:void(0)">{$money['yesterday']}</a> 元</td>
	</tr>
	<tr align="center">
		<td>停用客户</td>
		<td><a href="javascript:void(0)">{$userinfo['not_active']}</a> 个
		</td>
		<td>本月计费总计</td>
		<td><a href="javascript:void(0)">{$money['month']}</a> 元</td>
	</tr>
	<tr align="center">
		<td>客户数量总计</td>
		<td><a href="javascript:void(0)">{$userinfo['count_user']}</a> 个
		</td>
		<td>全部计费总计</td>
		<td><a href="javascript:void(0)">{$money['total']}</a> 元</td>
	</tr>
    <tr align="center">
        <td>站点数量总计</td>
        <td><a href="javascript:void(0)">{$userinfo['count_site']}</a> 个
        </td>
        <td>关键词数量总计</td>
        <td><a href="javascript:void(0)">{$userinfo['count_keyword']}</a>个</td>
    </tr>
</table>
</div>
<div class="title c mt10">近期计费合计走势图</div>
<div id="charts"></div>
</div>
</div>
<include file="Index:footer" />
<script type="text/javascript">
$(function() {
    Highcharts.setOptions({ 
        colors: ['#ff7902', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4'] 
    }); 
$('#charts').highcharts({
    chart: {
        type: 'spline',
        height: 300
    },
    title: {
        text: '近期计费合计走势图（客户消费）'
    },
    xAxis: {
        tickInterval: 4,
        categories: [
            {$chart['category']}
        ]
    },
    yAxis: {
        min:0,
        tickInterval: 500,
        title: {
            text: '合计费用（元）'
        },
        labels: {
            formatter: function() {
                return this.value + '元'
            }
        },
    },
    tooltip: {
        formatter: function() {  
                   return '消费总计:' + Highcharts.numberFormat(this.y, 1)+'元<br/>消费日期:'+ this.x;  
               }
    },
    plotOptions: {
        spline: {
            events: {
                click: function(e) {
                    art.dialog.open("/Index/datecount/date/" + e.point.days, {
                        title: "计费明细",
                        width: 400,
                        lock: true
                    });
                }
            }
        }
    },
    series: [{
        name: '计费合计',
        data: [{$chart['showdatas']}]
    }]
});
});
    </script>
</body>
</html>